home *** CD-ROM | disk | FTP | other *** search
/ Master Visual Basic 3 / Master Visual Basic 3 (SAMS Publishing) (1994).ISO / mvprog / original / ch03 / mymenu.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-04-06  |  8.7 KB  |  284 lines

  1. VERSION 2.00
  2. Begin Form frmMyMenu 
  3.    Caption         =   "The MyMenu Program"
  4.    ClientHeight    =   6255
  5.    ClientLeft      =   1095
  6.    ClientTop       =   705
  7.    ClientWidth     =   7365
  8.    Height          =   6945
  9.    Icon            =   MYMENU.FRX:0000
  10.    Left            =   1035
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   6255
  13.    ScaleWidth      =   7365
  14.    Top             =   75
  15.    Width           =   7485
  16.    Begin PictureBox picStatusbar2 
  17.       Align           =   2  'Align Bottom
  18.       BackColor       =   &H00C0C0C0&
  19.       Height          =   1140
  20.       Left            =   0
  21.       ScaleHeight     =   1110
  22.       ScaleWidth      =   7335
  23.       TabIndex        =   3
  24.       Top             =   4620
  25.       Width           =   7365
  26.       Begin CheckBox chkNoColorMenu 
  27.          BackColor       =   &H00C0C0C0&
  28.          Caption         =   "Color Menu"
  29.          Height          =   615
  30.          Left            =   480
  31.          TabIndex        =   5
  32.          Top             =   240
  33.          Value           =   1  'Checked
  34.          Width           =   1335
  35.       End
  36.       Begin Image imgExit 
  37.          Height          =   1125
  38.          Left            =   6240
  39.          Picture         =   MYMENU.FRX:0302
  40.          Top             =   0
  41.          Width           =   1125
  42.       End
  43.       Begin Image imgExitUp 
  44.          Height          =   1125
  45.          Left            =   6240
  46.          Picture         =   MYMENU.FRX:0F34
  47.          Top             =   0
  48.          Visible         =   0   'False
  49.          Width           =   1125
  50.       End
  51.       Begin Image imgExitDn 
  52.          Height          =   1125
  53.          Left            =   6240
  54.          Picture         =   MYMENU.FRX:1B66
  55.          Top             =   0
  56.          Visible         =   0   'False
  57.          Width           =   1125
  58.       End
  59.    End
  60.    Begin PictureBox picStatusbar1 
  61.       Align           =   2  'Align Bottom
  62.       BackColor       =   &H00C0C0C0&
  63.       Height          =   495
  64.       Left            =   0
  65.       ScaleHeight     =   465
  66.       ScaleWidth      =   7335
  67.       TabIndex        =   2
  68.       Top             =   5760
  69.       Width           =   7365
  70.       Begin CommandButton cmdExit 
  71.          Caption         =   "E&xit"
  72.          Height          =   495
  73.          Left            =   480
  74.          TabIndex        =   4
  75.          Top             =   0
  76.          Width           =   1335
  77.       End
  78.    End
  79.    Begin PictureBox picToolbar2 
  80.       Align           =   1  'Align Top
  81.       BackColor       =   &H00C0C0C0&
  82.       Height          =   1680
  83.       Left            =   0
  84.       ScaleHeight     =   1650
  85.       ScaleWidth      =   7335
  86.       TabIndex        =   1
  87.       Top             =   1695
  88.       Width           =   7365
  89.       Begin Image imgRed 
  90.          Height          =   1665
  91.          Left            =   0
  92.          Picture         =   MYMENU.FRX:2798
  93.          Top             =   0
  94.          Width           =   1275
  95.       End
  96.       Begin Image imgRedUp 
  97.          Height          =   1665
  98.          Left            =   0
  99.          Picture         =   MYMENU.FRX:3B26
  100.          Top             =   0
  101.          Visible         =   0   'False
  102.          Width           =   1275
  103.       End
  104.       Begin Image imgRedDn 
  105.          Height          =   1665
  106.          Left            =   0
  107.          Picture         =   MYMENU.FRX:4EB4
  108.          Stretch         =   -1  'True
  109.          Top             =   0
  110.          Visible         =   0   'False
  111.          Width           =   1275
  112.       End
  113.    End
  114.    Begin PictureBox picToolbar1 
  115.       Align           =   1  'Align Top
  116.       BackColor       =   &H00C0C0C0&
  117.       Height          =   1695
  118.       Left            =   0
  119.       ScaleHeight     =   1665
  120.       ScaleWidth      =   7335
  121.       TabIndex        =   0
  122.       Top             =   0
  123.       Width           =   7365
  124.       Begin Image imgBlue 
  125.          Height          =   1665
  126.          Left            =   3240
  127.          Picture         =   MYMENU.FRX:6242
  128.          Top             =   0
  129.          Width           =   1275
  130.       End
  131.       Begin Image imgBlueUp 
  132.          Height          =   1665
  133.          Left            =   3240
  134.          Picture         =   MYMENU.FRX:75D0
  135.          Top             =   0
  136.          Visible         =   0   'False
  137.          Width           =   1275
  138.       End
  139.       Begin Image imgBlueDn 
  140.          Height          =   1665
  141.          Left            =   3240
  142.          Picture         =   MYMENU.FRX:895E
  143.          Top             =   0
  144.          Visible         =   0   'False
  145.          Width           =   1275
  146.       End
  147.       Begin Image imgGreen 
  148.          Height          =   1665
  149.          Left            =   1920
  150.          Picture         =   MYMENU.FRX:9CEC
  151.          Top             =   0
  152.          Width           =   1275
  153.       End
  154.       Begin Image imgGreenDn 
  155.          Height          =   1665
  156.          Left            =   1920
  157.          Picture         =   MYMENU.FRX:B07A
  158.          Top             =   0
  159.          Visible         =   0   'False
  160.          Width           =   1275
  161.       End
  162.       Begin Image imgGreenUp 
  163.          Height          =   1665
  164.          Left            =   1920
  165.          Picture         =   MYMENU.FRX:C408
  166.          Top             =   0
  167.          Visible         =   0   'False
  168.          Width           =   1275
  169.       End
  170.    End
  171.    Begin Menu mnuFile 
  172.       Caption         =   "&File"
  173.       Begin Menu mnuExit 
  174.          Caption         =   "E&xit"
  175.       End
  176.    End
  177.    Begin Menu mnuColor 
  178.       Caption         =   "&Color"
  179.       Begin Menu mnuRed 
  180.          Caption         =   "&Red"
  181.       End
  182.       Begin Menu mnuBlue 
  183.          Caption         =   "&Blue"
  184.       End
  185.       Begin Menu mnuGreen 
  186.          Caption         =   "&Green"
  187.       End
  188.    End
  189.    Begin Menu mnuToolAndStatus 
  190.       Caption         =   "&Tool and Status Bar"
  191.       Begin Menu mnuToolbar 
  192.          Caption         =   "&Toolbar"
  193.          Checked         =   -1  'True
  194.       End
  195.       Begin Menu mnuStatusbar 
  196.          Caption         =   "&Statusbar"
  197.          Checked         =   -1  'True
  198.       End
  199.    End
  200. Option Explicit
  201. Sub chkNoColorMenu_Click ()
  202.     If chkNoColorMenu.Value = 0 Then
  203.        mnuColor.Visible = False
  204.     Else
  205.        mnuColor.Visible = True
  206.     End If
  207. End Sub
  208. Sub cmdExit_Click ()
  209.     End
  210. End Sub
  211. Sub imgBlue_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  212.     imgBlue.Picture = imgBlueDn.Picture
  213. End Sub
  214. Sub imgBlue_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  215.     imgBlue.Picture = imgBlueUp.Picture
  216.     mnuBlue_Click
  217. End Sub
  218. Sub imgExit_Click ()
  219.     End
  220. End Sub
  221. Sub imgExit_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  222.     imgExit.Picture = imgExitDn.Picture
  223. End Sub
  224. Sub imgExit_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  225.     imgExit.Picture = imgExitUp.Picture
  226. End Sub
  227. Sub imgGreen_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  228.     imgGreen.Picture = imgGreenDn.Picture
  229. End Sub
  230. Sub imgGreen_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  231.     imgGreen.Picture = imgGreenUp.Picture
  232.     mnuGreen_Click
  233. End Sub
  234. Sub imgRed_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  235. imgRed.Picture = imgRedDn.Picture
  236. End Sub
  237. Sub imgRed_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  238.      imgRed.Picture = imgRedUp.Picture
  239.      mnuRed_Click
  240. End Sub
  241. Sub mnuBlue_Click ()
  242.     frmMyMenu.BackColor = QBColor(1)
  243.     mnuRed.Enabled = True
  244.     mnuGreen.Enabled = True
  245.     mnuBlue.Enabled = False
  246. End Sub
  247. Sub mnuExit_Click ()
  248.     End
  249. End Sub
  250. Sub mnuGreen_Click ()
  251.     frmMyMenu.BackColor = QBColor(2)
  252.     mnuRed.Enabled = True
  253.     mnuGreen.Enabled = False
  254.     mnuBlue.Enabled = True
  255. End Sub
  256. Sub mnuRed_Click ()
  257.     frmMyMenu.BackColor = QBColor(4)
  258.     mnuRed.Enabled = False
  259.     mnuGreen.Enabled = True
  260.     mnuBlue.Enabled = True
  261. End Sub
  262. Sub mnuStatusbar_Click ()
  263.     If mnuStatusbar.Checked = True Then
  264.        picStatusbar1.Visible = False
  265.        picStatusbar2.Visible = False
  266.        mnuStatusbar.Checked = False
  267.     Else
  268.        picStatusbar1.Visible = True
  269.        picStatusbar2.Visible = True
  270.        mnuStatusbar.Checked = True
  271.     End If
  272. End Sub
  273. Sub mnuToolbar_Click ()
  274.     If mnuToolbar.Checked = True Then
  275.        picToolbar1.Visible = False
  276.        picToolbar2.Visible = False
  277.        mnuToolbar.Checked = False
  278.     Else
  279.        picToolbar1.Visible = True
  280.        picToolbar2.Visible = True
  281.        mnuToolbar.Checked = True
  282.     End If
  283. End Sub
  284.